package com.itheima.HomeWork_day06;
/*
toString方法
 */
public class ObjectTest01 {
    public static void main(String[] args) {
        Phone p1=new Phone("三星","银白");
        Phone p2=new Phone("华为","土豪金");


        //没有重写toString方法前,打印的是地址值.
//        System.out.println(p1);
//        System.out.println(p2.toString());

        System.out.println(p1);
        System.out.println(p2.toString());
    }
}
